<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>易买网 - 首页</title>
    <link type="text/css" rel="stylesheet" href="css/style.css" />
    <script type="text/javascript" src="scripts/function.js"></script>
</head>
<body>
<div id="header" class="wrap">
    <div id="logo"><img src="images/logo.gif" /></div>
    <div class="help"><a href="#" class="shopping">购物车</a><a href="login.html">登录</a><a href="register.html">注册</a><a href="guestbook.html">留言</a></div>
    <div class="navbar">
        <ul class="clearfix">
            <li class="current"><a href="#">首页</a></li>
            <li><a href="#">图书</a></li>
            <li><a href="#">百货</a></li>
            <li><a href="#">品牌</a></li>
            <li><a href="#">促销</a></li>
        </ul>
    </div>
</div>
<div id="childNav">
    <div class="wrap">
        <ul class="clearfix">
            <li class="first"><a href="#">音乐</a></li>
            <li><a href="#">影视</a></li>
            <li><a href="#">少儿</a></li>
            <li><a href="#">动漫</a></li>
            <li><a href="#">小说</a></li>
            <li><a href="#">外语</a></li>
            <li><a href="#">数码相机</a></li>
            <li><a href="#">笔记本</a></li>
            <li><a href="#">羽绒服</a></li>
            <li><a href="#">秋冬靴</a></li>
            <li><a href="#">运动鞋</a></li>
            <li><a href="#">美容护肤</a></li>
            <li><a href="#">家纺用品</a></li>
            <li><a href="#">婴幼奶粉</a></li>
            <li><a href="#">饰品</a></li>
            <li class="last"><a href="#">Investor Relations</a></li>
        </ul>
    </div>
</div>
<div id="position" class="wrap">
    您现在的位置：<a href="index.html">易买网</a> &gt; 购物车
</div>
<div class="wrap">
    <div id="shopping">

            <center>

                <br><br>
                <div id="productNumber">您的购物车中共有 ${sessionScope.ShoppingCart.productNumber } 件商品</div>
                <table cellpadding="10">
                    <tr>
                        <td>Title</td>
                        <td>Quantity</td>
                        <td>Price</td>
                        <td>&nbsp;</td>
                    </tr>

                    <c:forEach items="${sessionScope.ShoppingCart.items }" var="item">
                        <tr>
                            <td>${item.product.title }</td>
                            <td>
                                <input class="${item.quantity }" type="text" size="1" name="${item.product.id }" value="${item.quantity }"/>
                            </td>
                            <td>${item.product.price }</td>
                            <td><a href="Servlet?method=remove&id=${item.product.id }" class="delete">删除</a></td>
                        </tr>
                    </c:forEach>

                    <tr>
                        <td colspan="4" id="totalMoney">总金额: ￥ ${ sessionScope.ShoppingCart.totalMoney}</td>
                    </tr>

                    <tr>
                        <td colspan="4">
                            <a href="CartServlet?method=forwardPage&page=product-list">继续购物</a>
                            &nbsp;&nbsp;

                            <a href="CartServlet?method=clear">清空购物车</a>
                            &nbsp;&nbsp;

                            <a href="CartServlet?method=forwardPage&page=shopping-result">结算</a>
                            &nbsp;&nbsp;
                        </td>
                    </tr>

                </table>

            </center>

            <br><br>

    </div>

</div>
<div id="footer">
    Copyright &copy; 2010 北大青鸟 All Rights Reserved. 京ICP证1000001号
</div>
</body>
</html>

